package com.hotel.api.service;

import com.hotel.api.entity.Room;
import com.hotel.api.entity.User;
import com.hotel.api.entity.UserChangeRoom;
import com.hotel.api.mapper.UserChangeroomMapper;
import com.hotel.api.vo.UserChangerRoomVO;

import java.util.List;

/**
 * 宿舍管理
 *
 * @Author 涛涛
 * @Create 2019/8/29
 */
public interface RoomService {

    List<Room> selectUserRoomsByRoomNum(Integer rid);

    int insert(Room record);

    List<Room> selectAll();

    List<Room> selectUserRooms();

    List<Room> selectRoomByTypeRoom(int type);

    Room selectRoomByRoomNumber(int room_number);

    List<Room> selectNameByRoomNumber(int room_number);

    List<Room> selectRoomByCompany(String company);

    int deleteRoomByRoomNumber(Integer rid);

    int updateLivePeopleNumberAddByRoom(int roomNumber);

    int updateLivePeopleNumberReduceByRoom(int roomNumber);

    int updateRoomByType(Room room);

    int updateRoomByPhoto(String photo, int roomNumber);

    int updateRoomByCompany(String company, int roomNumber);

    int updateRoomInfoById(Room room);

    //换宿舍

    public int userChangeRoom(UserChangeRoom userChangeRoom);

    public int updateRoomByChange(String name, String idCard, int newRoom);

    //查看宿舍换宿表
    List<UserChangeRoom> selectUserChangeRoomOrders();

    //管理员查看有空余床位的房间
    List<Room> selectEntryRoom();

    int updateChangeRoomOrderState(UserChangeRoom userChangeRoom);

    UserChangerRoomVO selectUserChangeRoomById(Integer id);

    int addRoomNumber(Integer roomNum);

    int reduceRoomNumber(Integer roomNum);

    UserChangeRoom selectUserChangeRoomByUserId(Integer id);
}
